//
//  YWInformationBankModel.m
//  maintain
//
//  Created by Kyo on 16/5/19.
//  Copyright © 2016年 ewin. All rights reserved.
//

#import "YWInformationBankModel.h"
#import "YWattachment.h"
#import "MJExtension.h"

@implementation YWInformationBankModel

+ (NSDictionary*)mj_replacedKeyFromPropertyName
{
    return @{ @"infoId" : @"id"};
}

+ (NSArray *)mj_ignoredPropertyNames{
    return @[@"creatorId",@"attachmentId"];
}

- (void)mj_keyValuesDidFinishConvertingToObject{
    if (self.attachment) {
        if (self.typeId) {
            NSInteger type = self.typeId;
            self.attachment.attachmentType = type;
        }
        if (self.infoId) {
            self.attachment.recordId = self.infoId;
        }
    }
    
}
@end
